package com.wanxi.spring.cloud.permission.mapper;


import com.wanxi.spring.cloud.permission.model.Permission;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author 蒋帆
 * @since 2020-12-21
 */
public interface PermissionMapper {

    long getPermissionsCount();

    List<Permission> getPermissions(@Param("page") Integer page,@Param("limit") Integer limit);

    int addPermission(Permission permission);

    int updatePermission(Permission permission);

    int deletePermission(Integer id);

    List<Permission> getAllPermissions();

    List<Permission> getLeaderExtraPermissions();

    List<Permission> getPermissions(Map map);

    long getPermissionsCount(Map map);
}
